// RedJey Graphics User Interface Library for J2ME Platform.
// Copyright (C) 2008 Yevgen Krapiva
//
// This library is free software; you can redistribute
// it and/or modify it under the terms of the
// GNU Lesser General Public License as published
// by the Free Software Foundation; either version 3.0
// of the License, or any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this library; if not, write to the Free Software Foundation, Inc.,
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//

package com.incrediblesoft.redjey.event;

/**
 * @author Yevgen Krapiva<br>
 *         Homepage: http://code.google.com/p/redjey/<br>
 *         Feedback: ykrapiva@gmail.com<br>
 *         Copyright (C) 2008 Yevgen Krapiva<br>
 */

import com.incrediblesoft.redjey.Component;


public class MouseEvent extends AbstractEvent
{
    //public static final int MOUSE_ENTERED = 0;
    //public static final int MOUSE_EXITED = 1;

    public static final int MOUSE_PRESSED = 2;
    public static final int MOUSE_RELEASED = 3;
    public static final int MOUSE_CLICKED = 4;

    //public static final int MOUSE_MOVED = 5;
    public static final int MOUSE_SCROLL_VERTICAL = 6;
    public static final int MOUSE_SCROLL_HORIZONTAL = 7;

    protected int x, y;
    protected int value;

    public MouseEvent(Component source, int mouse_id, int x, int y, int value)
    {
        super(source, mouse_id, AbstractEvent.MOUSE_EVENT);
        this.x = x;
        this.y = y;
        this.value = value;
    }

    public MouseEvent(Component source, int mouse_id)
    {
        this(source, mouse_id, 0, 0, 0);
    }

    public int getX()
    {
        return x;
    }

    public int getY()
    {
        return y;
    }

    public int getValue()
    {
        return value;
    }

    public void setX(int x)
    {
        this.x = x;
    }

    public void setY(int y)
    {
        this.y = y;
    }    
}
